import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld,
      meta: {
        keepAlive: false
      }
    },
    {
      path: '/login',
      name: 'login',
      component: (resolve) => require(['@/pages/login'], resolve),
      meta: {
        keepAlive: false
      }
    },
    {
      path: '/Home',
      name: 'Home',
      component: (resolve) => require(['@/pages/Home'], resolve),
      meta: {
        keepAlive: true
      }
    },
    {
      path: '/Register',
      name: 'Register',
      component: (resolve) => require(['@/pages/Register'], resolve),
      meta: {
        keepAlive: true
      }
    },
    {
      path: '/Adopt',
      name: 'Adopt',
      component: (resolve) => require(['@/pages/Adopt'], resolve),
      meta: {
        keepAlive: true
      }
    },
    {
      path: '/Settings',
      name: 'Settings',
      component: (resolve) => require(['@/pages/Settings'], resolve),
      meta: {
        keepAlive: true
      }
    }
  ]
})
